package com.example.adapter.demo.login.v3.adapter;

import com.example.adapter.demo.login.v3.ResultMsg;

/**
 * @author zhoubin
 */
public class LoginForTelphoneAdapter extends AbstractAdapter {

    private String telphone;
    private String code;

    public LoginForTelphoneAdapter(String telphone, String code) {
        this.telphone = telphone;
        this.code = code;
    }

    @Override
    public boolean support(Object loginAdapter) {
        return loginAdapter instanceof LoginForTelphoneAdapter;
    }

    @Override
    public ResultMsg login() {
        ResultMsg resultMsg = super.loginForRegist(telphone, null);
        System.out.println("手机号 登录成功");
        return resultMsg;
    }
}
